import ArticleDetailPage from "../page/ArticleDetailPage"
import CreatePage from "../page/CreatePage"
import HomePage from "../page/HomePage"
import LogInPage from "../page/LogInPage"
import NotFound from "../page/NotFound"
import RegisterPage from "../page/RegisterPage"
import RetrievePasswordPage from "../page/RetrievePasswordPage"
import UserPage from "../page/UserPage"
import UsersPage from "../page/UsersPage"

const routes = [
  //重定向
  {
    path: "*",
    component: NotFound,
  },
  {
    path: "/login",
    component: LogInPage,
  },
  {
    path: "/home",
    component: HomePage,
  },
  {
    path: "/register",
    component: RegisterPage,
  },
  {
    path: "/retrievePassword",
    component: RetrievePasswordPage,
  }, {
    path: "/user",
    component: UserPage,
  },
  {
    path: "/create",
    component: CreatePage,
  },
  {
    path: `/article/id=:id`,
    component: ArticleDetailPage,
  },
  {
    path: "/userInfo/userId=:id",
    component: UsersPage,
  }
]

export default routes